<?php

namespace app\common\service;

use Qiniu\Auth;

class Qiniu
{
    public function __construct()
    {
        $this->bucket = config('qiniu.bucket');
        $this->accessKey = config('qiniu.accessKey');
        $this->secretKey = config('qiniu.secretKey');
    }

    public function uploadToken()
    {
        $auth = new Auth($this->accessKey,  $this->secretKey);
        return $auth->uploadToken($this->bucket);
    }
}
